Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie needs help!

Status
Not open for further replies.

nmiddleweek

Programmer
Jan 14, 2002
1
GB
Hello,

I installed VS 6 last night, and started playing with the Stuffit SDK to
compress .zip and .sit files. I managed to get their example code working
and 'sort of' managed to find my way around the VC++ 6 environment. :)

I'm a 4D developer ( and I'm also playing with the 4D SDK. My
plan is to write a 4D Plug-in that allows me to path it a file path and have
that file be compressed into a zip or sit file based on parameters.

I've created a 4D SDK plug-in project and have got a really basic one
working: I pass it a string and that string is then returned! Wow! :)

I've now tried to load the libraries from the Stuffit SDK into the 4D
Plug-In VC++ project. I've then copied the code into the from the Stuffit
example (about 5 lines) into the 4D Plug-in .c file.

I've tried to build (F7) the project and got some errors, I then noticed
that the Stuffit example source file's extension is .cpp? Why is this? Is it
because it's written in C++ and not C? So I renamed the 4dplug-ins .c file
from .cpp, deleted the older .c file from the project and added the newer
.cpp file. F7 again, I still got errors - but not as many! :)

Here's the first error, can anyone help me please?


*********************
--------------------Configuration: 4D Plugin - Win32
Debug--------------------
Linking...
Creating library Objs/Debug/4D Plugin.lib and object Objs/Debug/4D
Plugin.exp
4DPlugin.obj : error LNK2001: unresolved external symbol "public: virtual
__thiscall stuffit5::Writer::~Writer(void)" (??1Writer@stuffit5@@UAE@XZ)

4DPlugin.obj : error LNK2001: unresolved external symbol "public: __thiscall
stuffit5::Writer::Writer(void)" (??0Writer@stuffit5@@QAE@XZ)

WIN4DX/4D Plugin.4DX : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

4D Plugin.4DX - 3 error(s), 0 warning(s)

*********************





Thank you very much!


Regards,
Nick
 
This could be due to one of several reasons, but all of them mean that the linker doesn't know where to find the Writer() constructor and destructor:

1) the source code and header files containing the Writer class belong in your project but are missing

2) the external library containing the Writer class is missing

3) the library containing the Writer class exists, but is not included in your project as a library to be linked

... or there could be different scenerios. In any case, use the Visual Studio "Search in Files" feature to look for the Writer class.

If the source files exist, but are not part of a library, try moving the files into your project directory and add them to your project in Visual Studio and recompile the project.

If the source files are in a different directory as part of a library, make sure that library is compiled and that the path to the library binary file is included in your project settings and that the library itself is included in your project as a library to be linked.

But the bottom line is, you've got to find that Writer class and let your project know how to find it.
Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top