Thread: Problem with PNGWriter

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    6

    Problem with PNGWriter

    I was doing some experiments with PNGWriter. To verify a sample code, I typed it into the text editor and compiled (Visual C++ ver 6). First it showed several errors saying something.h not found. After doing a bit of googling, I got all the headers which were not being found earlier and it compiled successfully.
    Then I tried linking. But it showed 5 errors that I cannot comprehend.
    They were


    Linking...
    Cpp3.obj : error LNK2001: unresolved external symbol "public: __thiscall pngwriter::~pngwriter(void)" (??1pngwriter@@QAE@XZ)
    Cpp3.obj : error LNK2001: unresolved external symbol "public: void __thiscall pngwriter::close(void)" (?close@pngwriter@@QAEXXZ)
    Cpp3.obj : error LNK2001: unresolved external symbol "public: void __thiscall pngwriter:lot(int,int,double,double,double)" (?plot@pngwriter@@QAEXHHNNN@Z)
    Cpp3.obj : error LNK2001: unresolved external symbol "public: __thiscall pngwriter:ngwriter(int,int,int,char *)" (??0pngwriter@@QAE@HHHPAD@Z)
    Debug/Cpp3.exe : fatal error LNK1120: 4 unresolved externals
    Error executing link.exe.

    Cpp3.exe - 5 error(s), 0 warning(s)


    What's going on?

  2. #2
    Registered User
    Join Date
    Aug 2004
    Posts
    731
    Did you link the lib files?

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    6
    Actually, I am using Visual C++ to compile my program. It has two options, one is 'compile' and one is 'Build exe'. Compiling does not give any errors, but Building exe does. There is no way to pass some arguments while linking. So I assumed that it automatically links all the header files in the programme while building exe.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Well if you added a path to the compiler include path to pick up the headers, then that would be enough to make it compile.

    You also need to add the path to the png library AND the name of the png library in a similar way to the linker library path.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM