Ah yeah, I forgot to mention... some are .c files, some are .cpp files.... they're all compatible with c++ (compiles and runs fine in g++. In fact, this program is a straight port of a test program that I used to test the my library in linux, with only very minor changes to get it to compile in windows).
As for the directory structure, my project's directory is in a folder called My Documents/pmc_lib_test. All the files pertaining to this library that I've made is on a separate harddrive in a folder called pmc_libs, with the header files being in this directory and the source files being in pmc_libs/win32, pmc_libs/libs/nix, and pmc_libs/c++libs (/c++libs has a couple c++ wrapper classes for the library, which was written in C. The wrapper classes are also being used in the VS project).
Also, not sure if this matters, but the include lines in the source files reference the header file's location relatively, (#include "../pmc.h", for example).
Here is the cut and paste of the error log:
Code:
Linking...
pmc_lib_test.obj : error LNK2019: unresolved external symbol "int __cdecl pmc_addtlv(struct pmcMsg *,unsigned short,unsigned short,void *)" (?pmc_addtlv@@YAHPAUpmcMsg@@GGPAX@Z) referenced in function _main
pmc_wrapper.obj : error LNK2001: unresolved external symbol "int __cdecl pmc_addtlv(struct pmcMsg *,unsigned short,unsigned short,void *)" (?pmc_addtlv@@YAHPAUpmcMsg@@GGPAX@Z)
pmc_lib_test.obj : error LNK2019: unresolved external symbol "struct pmcMsg * __cdecl pmc_createmsg(struct pmcMsg * *,unsigned short,unsigned short,unsigned short)" (?pmc_createmsg@@YAPAUpmcMsg@@PAPAU1@GGG@Z) referenced in function _main
pmc_wrapper.obj : error LNK2001: unresolved external symbol "struct pmcMsg * __cdecl pmc_createmsg(struct pmcMsg * *,unsigned short,unsigned short,unsigned short)" (?pmc_createmsg@@YAPAUpmcMsg@@PAPAU1@GGG@Z)
pmc_lib_test.obj : error LNK2019: unresolved external symbol "int __cdecl initwinsock(void)" (?initwinsock@@YAHXZ) referenced in function _main
pmc_wrapper.obj : error LNK2019: unresolved external symbol "int __cdecl pmc_sendmsg(int,struct pmcMsg * *,char)" (?pmc_sendmsg@@YAHHPAPAUpmcMsg@@D@Z) referenced in function "public: int __thiscall CPMCMsg::Send(int)" (?Send@CPMCMsg@@QAEHH@Z)
pmc_wrapper.obj : error LNK2019: unresolved external symbol "struct rpmcMsg * __cdecl pmc_recvmsg(int)" (?pmc_recvmsg@@YAPAUrpmcMsg@@H@Z) referenced in function "public: int __thiscall CPMCMsg::Recv(int)" (?Recv@CPMCMsg@@QAEHH@Z)
.\Debug/pmc_lib_test.exe : fatal error LNK1120: 5 unresolved externals
pmc_lib_test is the VS project, and pmc_wrapper is the source that contains the c++ wrapper classes.
Here is my command line log:
Code:
Creating temporary file "C:\DOCUME~1\Matt\LOCALS~1\Temp\RSP000001.rsp" with contents
[
/OUT:".\Debug/pmc_lib_test.exe" /INCREMENTAL /NOLOGO /DEBUG /PDB:".\Debug/pmc_lib_test.pdb" /SUBSYSTEM:CONSOLE /MACHINE:I386 odbc32.lib odbccp32.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
"Debug\StdAfx.obj"
"Debug\pmc_lib_test.obj"
"Debug\pmc_w32.obj"
"Debug\pmc_wrapper.obj"
"Debug\srv_general_w32.obj"
]
Creating command line "link.exe @C:\DOCUME~1\Matt\LOCALS~1\Temp\RSP000001.rsp"
Any thoughts? Thanks for the help and quick reply