473,770 Members | 4,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Visual C++ 6 Compilation Problem

Hi,
I am having problems compiling a small project in VC++ 6. I have
included the error below and the full project (including workspace) can
be downloaded here:
http://www.freebreakfast.co.uk/Example1.zip
I am new to C++ (esp. using multiple files) and I am not sure I have
structured the files right (with the correct includes etc). Any other
suggestions about the code would be greatly appreciated.
Also, how do I implement threading in C++. I have used threading in Java
before and so am familiar with the way in which they operate. Any
tutorials on the matter would be great. (I'm preferably looking for a
platform-independent solution but a Win32 method of doing this would
also be great)

Sorry for all the questions...

Thanks in advance,
Connell

Error Message which "Rebuilding All":
-------------------------------------

Compiling...
HeadNode.cpp
InternalNode.cp p
LinkedList.cpp
main.cpp
Node.cpp
ship.cpp
TailNode.cpp
Linking...
main.obj : error LNK2001: unresolved external symbol "public: __thiscall
LinkedList<clas s Ship>::LinkedLi st<class Ship>(void)"
(??0?$LinkedLis t@VShip@@@@QAE@ XZ)
main.obj : error LNK2001: unresolved external symbol "public: class Ship
* __thiscall LinkedList<clas s Ship>::GetNextO bject(class Ship *)"
(?GetNextObject @?$LinkedList@V Ship@@@@QAEPAVS hip@@PAV2@@Z)
main.obj : error LNK2001: unresolved external symbol "public: class Ship
* __thiscall LinkedList<clas s Ship>::GetFirst Object(void)"
(?GetFirstObjec t@?$LinkedList@ VShip@@@@QAEPAV Ship@@XZ)
main.obj : error LNK2001: unresolved external symbol "public: void
__thiscall LinkedList<clas s Ship>::Insert(c lass Ship *)"
(?Insert@?$Link edList@VShip@@@ @QAEXPAVShip@@@ Z)
Debug/Example1.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.

Example1.exe - 5 error(s), 0 warning(s)
Jul 22 '05 #1
2 1516
On Wed, 21 Jul 2004 19:45:09 +0100, Connell Gauld
<co*****@freebr eakfast.co.uk> wrote:
Hi,
I am having problems compiling a small project in VC++ 6. I have
included the error below and the full project (including workspace) can
be downloaded here:
http://www.freebreakfast.co.uk/Example1.zip
I am new to C++ (esp. using multiple files) and I am not sure I have
structured the files right (with the correct includes etc). Any other
suggestions about the code would be greatly appreciated.


Given that all your linker errors are template code this looks like the
classic template link error question. Probably the most commonly asked
question on this group.

You can find the answer in the FAQ

http://www.parashift.com/c++-faq-lit...html#faq-34.12

but the short answer is put all template code into header files.

john
Jul 22 '05 #2
On Wed, 21 Jul 2004 19:45:09 +0100, Connell Gauld wrote:
Also, how do I implement threading in C++. I have used threading in Java
before and so am familiar with the way in which they operate. Any
tutorials on the matter would be great. (I'm preferably looking for a
platform-independent solution but a Win32 method of doing this would
also be great)
The closest you're likely to get to platform-independent threads may be the
Boost libraries. See http://www.boost.org/ for details. I've also heard
some mention of ACE, but am not sure where to find it. For Win32 specific
methods, there are MS public newsgroups that would be better to ask in.
main.obj : error LNK2001: unresolved external symbol "public: __thiscall
LinkedList<clas s Ship>::LinkedLi st<class Ship>(void)"
(??0?$LinkedLis t@VShip@@@@QAE@ XZ)


This isn't a compilation error, but a linking error. The problem is a very
common one involving templates. This is covered in the C++ FAQ found at
http://www.parashift.com/c++-faq-lite/ sections 34.12-34.15.

--
Greg Schmidt gr***@trawna.co m
Trawna Publications http://www.trawna.com/
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7235
by: K. Shier | last post by:
when attempting to edit code in a class file, i see the bug "Visual Basic ..NET compiler is unable to recover from the following error: System Error &Hc0000005&(Visual Basic internal compiler error) Save your work and restart Visual Studio .NET." has anyone seen this bug and can you confirm one way or the other whether or not it can corrupt your source files? (by 'corrupt' i mean: do anything to it that will cause it to fail to load and...
1
3921
by: Novice | last post by:
Hi all, I'm afraid this is the second posting of this information as I didn't get a response on the previous post. I will try to shorten my message (i.e. be more concise) in the hopes that it will make it easier for someone (i.e. a Microsoft person) to digest the information and respond to it. I am a C++ and Java developer with over 3 years of industry experience. I've written low level C++ code, in addition to web clients that use web...
26
10882
by: Bruno Jouhier [MVP] | last post by:
I'm currently experiencing a strange phenomenon: At my Office, Visual Studio takes a very long time to compile our solution (more than 1 minute for the first project). At home, Visual Studio compiles the same solution much faster (about 10 seconds for the first project). My home computer is only marginally faster than the one I have at the office (P4 2.53 vs. P4 2.4, same amount of RAM). On the slow machine, the CPU usage is very low,...
0
1330
by: Bruno Jouhier [MVP] | last post by:
Last september, I posted a message about abnormal compilation times in Visual Studio .NET. I got some help from a nice guy from Sweden, who had the same problem and saw my post on the newsgroup. With his help, I ended up opening a support incident to MS and we got our issue resolved. So, I'm posting the workaround that MS gave us because it might interest people who have a setup like ours and who may be experiencing the same kind of...
15
2432
by: Ken Allen | last post by:
I have been developing a suite of assemblies over the past couple of weeks, and this afternoon somethign started misbehaving. If I do not run the IDE and compiler the code from the command line, the compilation seems to work properly almost all of the time. More on this later. If I launch one copy of the IDE, then I can usually compile the project at least once. At some point, the build fails reporting "Could not copy temporary files...
7
1693
by: hihaho | last post by:
I had a template library, the library was successfully compiled on versrion 6.0 but when I tried to upgrade it in .NET version, compilation had failed with the message like: error C2248 'MyPLib::Basic2DArray<T>::m' : cannot access protected member declared in 'PLib::Basic2DArray<T>' The class implemented by template <class T>
2
1707
by: David++ | last post by:
Hi, I'm trying to compile a project in C++.Net which was built using Visual C++ 6. I'm getting some major compile errors and need to find a solution soon. I can either try and convert the project so it is compatible with .NET (which I think will be error prone and risky) or I can downgrade to Visual C++ 6 and build the project there. The problems I'm having are this - 1. I've tried using the recommended resolutions to Migrate my...
13
4387
by: jc | last post by:
I have written a parser using bison and flex to read ASAP2 file for CAN communications. entire development was done in an unix environment and now the code is ready to be integrated to an existing CAN communication software that i wrote earlier in windows environment(as we get drivers for these CAN cards only for the windows). my problem started when i started to move the code from linux to the visual studio. after many compilation and...
2
1355
by: BobLaughland | last post by:
Hi All, I am using visual studio 2003 on a website I am developing on. I have it running inside a VM, and use IIS to host the website when I am viewing and debugging it. The problem is that when I recompile the project and then load up the site again with a browser it takes ages to load the start page (probably about 3 or 4 minutes).
4
2647
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. - Why is this happening? - Can I disable automatic declaration and have everything be declared manually? - Any other options to fix this? Thanks in advance. Goran Djuranovic
0
9439
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10071
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.