473,407 Members | 2,598 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,407 software developers and data experts.

Compiling C code in visual C++

1
I have written a INI file phaser in C, with the expectation that C is backwards compatible with c++. It compiles perfectly with gcc. However, when I try to compile it in Microsoft Visual C++ 6.0 i get the following errors:

--------------------Configuration: test - Win32 Debug--------------------
Linking...
in.obj : error LNK2001: unresolved external symbol _settings_delete
in.obj : error LNK2001: unresolved external symbol _settings_print
in.obj : error LNK2001: unresolved external symbol _settings_getvalue
in.obj : error LNK2001: unresolved external symbol _settings_new
Debug/test.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.

test.exe - 5 error(s), 0 warning(s)

Googleing told me that I had something wrong with my project settings, but none of them can get the C code to integrate with C++. What can I do to get it to compile?
Jun 6 '07 #1
3 1529
ajayraj
21
I have written a INI file phaser in C, with the expectation that C is backwards compatible with c++. It compiles perfectly with gcc. However, when I try to compile it in Microsoft Visual C++ 6.0 i get the following errors:

--------------------Configuration: test - Win32 Debug--------------------
Linking...
in.obj : error LNK2001: unresolved external symbol _settings_delete
in.obj : error LNK2001: unresolved external symbol _settings_print
in.obj : error LNK2001: unresolved external symbol _settings_getvalue
in.obj : error LNK2001: unresolved external symbol _settings_new
Debug/test.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.

test.exe - 5 error(s), 0 warning(s)

Googleing told me that I had something wrong with my project settings, but none of them can get the C code to integrate with C++. What can I do to get it to compile?
Please see me the code.
Jun 6 '07 #2
Silent1Mezzo
208 100+
You may have to change a few things in your C code to make it work in a C++ compiler. It probably won't work perfectly without any changes since there are differences.
Jun 6 '07 #3
weaknessforcats
9,208 Expert Mod 8TB
The linker can't find the code for these functions:

_settings_delete
_settings_print
_settings_getvalue
_settings_new

Be sure you include the library (or the .c file) that containsthe code for these functions. If it's a library, go to the property pages and find the linker properties and add your library as an additional dependency.
Jun 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html ...
17
by: Gary | last post by:
Had a recent opportunity to grab some MP2 audio encoder source to use in a little utility I am writing in support of a Korg portable multitrack digital recorder. It is LGPL C and my project is...
1
by: webstuff | last post by:
Hi, I recently started getting the BSOD (Stop 0xC5 and others) when compiling my C# application in Visual Studio. I was convinced it was was hardware problems until i checked out the code on my...
2
by: Rudy Ray Moore | last post by:
Hi guys, I just upgraded to "Visual Studio .net 2003 7.1 c++" from VS6. Some things I like (proper for loop variable scoping, for example), but some other things are troubling me. One...
1
by: Riaan | last post by:
I am compiling my app (including CODEBASE database headers) but as soon as i compile it gives me the following errors : c:\Program Files\Microsoft Visual Studio\VC98\Include\UTILITY(81) : warning...
3
by: RS | last post by:
Hi all, My code compiles well with gcc on linux and OS X, but now I have to run it at work, and my only choice is Visual Studio .Net 2003 environment on windows, which I had never used before....
0
by: jostein.solstad | last post by:
Hi I have been working with Delphi to create asp.net sites so far. I am now trying my luck with Visual Studio. But there are some differences in compiling, publishing my site that i have a...
1
by: jon2211 | last post by:
I tried to compile some code with #include <shellapi.h. I am linking shell32.lib. I am not trying to use ShellExecute() but right now just getting the code to compile with the header file an...
3
by: entice | last post by:
When I am compiling in visual c++ 2008 express edition I am receiving these two errors main.cpp(224) : error C2664: '_stricmp' : cannot convert parameter 1 from 'WCHAR ' to 'const char *' Types...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
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...
0
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,...

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.