Hi all,

I'm having trouble linking the Metakit library to a simple C++
program. I've searched the mailing list archives to no avail. I found
a a similar problem in
http://www.equi4.com/pipermail/metakit/2003-September/001421.html, but
that didn't help.

I am using MinGW (gcc version 3.4.2) on Windows XP to compile my
program, which is in a file named main.cpp:

 #include "mk4.h"

 int main(int argc, char* argv[]) {

     c4_Storage database;

     return 0;
 }


The directory structure is like this:

foo/main.cpp
foo/include/mk4.h
foo/include/mk4.inl
foo/include/mk4dll.h
foo/include/mk4io.h
foo/include/mk4str.h
foo/include/mk4str.inl
foo/bin/mk4vc60.dll
foo/bin/mk4cv60.lib

The libraries are the precompiled versions from the Metakit website.

When I try to compile using

g++ -I./include -L./bin main.cpp -lmk4vc60 -o mktest.exe

I get the following errors:

C:\...\Temp/cc0Iaaaa.o(.text+0x155):main.cpp: undefined reference to
`c4_Storage::c4_Storage()'
C:\...\Temp/cc0Iaaaa.o(.text+0x160):main.cpp: undefined reference to
`c4_Storage::~c4_Storage()'
collect2: ld returned 1 exit status

I'm sure that I'm probably overlooking something simple, but I'm
having a devil of a time figuring out what. Any help will be greatly
appreciated.

Thanks,
Edmond Ho
_____________________________________________
Metakit mailing list  -  [email protected]
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to