Results 1 to 6 of 6

Thread: Linux to Windows again...

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    Sweden
    Posts
    21

    Linux to Windows again...

    Why, oh why, doesn't it work...
    My Linux program compiles in MSVC++ 6.0, but I get linking errors:
    error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
    >::basic_string<char,struct std::char_traits<char>,class std::allocator<

    Could anyone help me???

    Thanks

    /goater

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    Sweden
    Posts
    21

    Re: Linux to Windows again...

    Left with 6 errors. They all seem to be related to #include "dirent.h"
    error LNK2001: unresolved external symbol _closedir
    and so on...

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Linux to Windows again...

    I believe dirent.h is a system specific header that you won't find in VC++. Given the fact you don't get errors about a missing header and the fact that you included it with "" rather than <>, I assume that is a header you grabbed from someplace else? (I don't have that one with my VC++ install, though it does appear in Cygwin, and Borland compilers.)

    If that is the case, you should realize that just grabbing the header is not enough. You also need proper libraries, because the libraries are what contain the actual implementation of the functions in the header.

    For instance, you could very easily just write a program like so...

    void DummyFunction();

    void main()
    {
    DummyFunction();
    }

    The compiler would be perfectly happy compiling that code. However, once it got to the linker, you would run into problems because you never actually implement DummyFunction.

    Hope that helps
    Deiussum
    Software Engineer and OpenGL enthusiast

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    Sweden
    Posts
    21

    Re: Linux to Windows again...

    Ok...I realize that this is not a very OpenGL-related topic...but I hope it's ok
    The thing is, I don't know what lib that should be included...and don't know where to search for it. Are there maybe any other class for reading dirs that you know of?

    --losing faith--

    goater

  5. #5
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Linux to Windows again...

    By reading dirs, I assume you mean reading a list of files in a dir? Check out the _findfirst and _findnext functions in MSDN.
    Deiussum
    Software Engineer and OpenGL enthusiast

  6. #6
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    Sweden
    Posts
    21

    Re: Linux to Windows again...

    Whohoo!
    I found the lib for dirent.h.
    Now it works.
    Thanks for your help!

    --faith is back--

    goater

Similar Threads

  1. tesselation different between linux and windows
    By wwuster in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-13-2010, 11:26 AM
  2. Linux/Windows
    By nt2010 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 04-06-2010, 07:52 PM
  3. Replies: 4
    Last Post: 01-30-2006, 03:25 PM
  4. Linux vs Windows
    By in forum OpenGL: Linux
    Replies: 5
    Last Post: 01-22-2002, 11:25 PM
  5. Linux to Windows
    By goater in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 07-21-2001, 03:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean