473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Novice VC++ upgrade question.

Lee
Hi Everyone,

I have a question on an error I got from compiling some test C++ code
in VS2005 that I had originally written in C in VC++ 6.0

In the original C test code I have my source broken up into two .c
files. One file (main.c) contains an array of procedures and above
that the procedures' prototypes. The other file contains the actual
procedure. This compiles just fine.

In the new C++ code in VS2005, this produces an error:
-> Error 1 error LNK2005: _FileID already defined in Main.obj

If I remove the prototype then the array complains that the procedures
are not defined. I am at a loss on how to proceed. (I guess this is
what I get for comming from a Java/C# background ;-Þ)

Thanks in advance,

L. Lee Saunders

Jan 13 '06 #1
1 829

is your array of procedures an array of function pointers or something else?
could you post some code? your explanation is not entirely clear.

what you could always do is merge the 2 files. put all functions above the
declaration of the array, remove the function declarations and everything
should compile just fine.

kind regards,
Bruno.

"Lee" <sa******@hotmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi Everyone,

I have a question on an error I got from compiling some test C++ code
in VS2005 that I had originally written in C in VC++ 6.0

In the original C test code I have my source broken up into two .c
files. One file (main.c) contains an array of procedures and above
that the procedures' prototypes. The other file contains the actual
procedure. This compiles just fine.

In the new C++ code in VS2005, this produces an error:
-> Error 1 error LNK2005: _FileID already defined in Main.obj

If I remove the prototype then the array complains that the procedures
are not defined. I am at a loss on how to proceed. (I guess this is
what I get for comming from a Java/C# background ;-Þ)

Thanks in advance,

L. Lee Saunders
Jan 13 '06 #2

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

Similar topics

2
by: George | last post by:
Is this group for a novice C++ programmers?
21
by: AES/newspost | last post by:
My understanding -- I'm not an expert -- is that on (some? many? all?) standard Internet servers a URL can point to a subdirectory name followed by a backslash, and that links to this URL will...
3
by: Fatfreek | last post by:
In the early 90's I kept annual journals in Word Perfect 5.1 and they were password protected. You guessed it -- I've forgotten the password. Only a few years ago under Win98 I found a...
3
by: Bill Hoy | last post by:
Hi, I have a few years of experience using MFC and Microsoft Visual C++ 6.0. As my company gets further into the software business they now want to start moving away from MFC, and use pure...
17
by: Paul | last post by:
HI! I get an error with this code. <SCRIPT language="JavaScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in...
2
by: John Harrison | last post by:
Hi, I have a copy of Visual Studio 2002 Professional. What is the best way to get hold of the new VC++ 7.1 compiler? I could upgrade to VS 2003 Pro, but expensive. Could I buy VC++ 2003...
36
by: Tim | last post by:
Is there a way to upgrade from Visual C++ Net 2002 to Visual C++ Net 2003? The 2002 version does not provide a Windows Forms Designer. I can't find any upgrade package on Microsoft's website. ...
5
by: JesseJr | last post by:
I recently installed Microsoft's Visual C++ 6.0 Enterprise Edition(1985-1999) on my antiquated AMD K-6 2/300 with 160 Mb of SDRAM (PC66) with a 120 Gb 8mb mem Seagate Hard Drive and an NVidia...
3
by: Darius | last post by:
Hello, there is an NMEAParserDemo application written in VC++ avaliable for download from http://www.visualgps.net/Papers/NMEAParser/NMEAParserDemo%20Project.zip. Source code in VC++ is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.