• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 309
  • Last Modified:

C++ Trying to create a 64 bit build from a 32 bit project and getting new errors.

Hello Ladies and Gents,

I have a project that has existed in Visual Studio 2008 in a 32 build.  I'm currently trying to get a build version for x64 and have recieved new errors of 2 types hich are below...

First Type...

warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
from this line...
fileNameLength = strlen( fileName );  fileNameLength is an int,  the function is a size_t strlen(const char* _Str)   etc.

The other types are the following...

2>System.obj : error LNK2019: unresolved external symbol CMultiChart_addChart referenced in function "public: void __cdecl MultiChart::addChart(int,int,class BaseChart *)" (?addChart@MultiChart@@QEAAXHHPEAVBaseChart@@@Z)
2>System.obj : error LNK2019: unresolved external symbol CDataSet_setLineWidth referenced in function "public: void __cdecl DataSet::setLineWidth(int)" (?setLineWidth@DataSet@@QEAAXH@Z)
2>System.obj : error LNK2019: unresolved external symbol CLayer_setLineWidth referenced in function "public: void __cdecl Layer::setLineWidth(int)" (?setLineWidth@Layer@@QEAAXH@Z)
2>System.obj : error LNK2019: unresolved external symbol CBox_setPos referenced in function "public: void __cdecl Box::setPos(int,int)" (?setPos@Box@@QEAAXHH@Z)
2>System.obj : error LNK2019: unresolved external symbol CAxis_setLinearScale referenced in function "public: void __cdecl Axis::setLinearScale(double,double,double,double)" (?setLinearScale@Axis@@QEAAXNNNN@Z)
2>System.obj : error LNK2019: unresolved external symbol CLayer_setUseYAxis2 referenced in function "public: void __cdecl Layer::setUseYAxis2(bool)" (?setUseYAxis2@Layer@@QEAAX_N@Z)
2>System.obj : error LNK2019: unresolved external symbol CXYChart_yAxis2 referenced in function "public: class Axis * __cdecl XYChart::yAxis2(void)" (?yAxis2@XYChart@@QEAAPEAVAxis@@XZ)
2>System.obj : error LNK2019: unresolved external symbol CXYChart_syncYAxis referenced in function "public: void __cdecl XYChart::syncYAxis(double,double)" (?syncYAxis@XYChart@@QEAAXNN@Z)
2>System.obj : error LNK2019: unresolved external symbol CArrayMath_create referenced in function "public: __cdecl ArrayMath::ArrayMath(class DoubleArray)" (??0ArrayMath@@QEAA@VDoubleArray@@@Z)
2>System.obj : error LNK2019: unresolved external symbol CArrayMath_destroy referenced in function "public: __cdecl ArrayMath::~ArrayMath(void)" (??1ArrayMath@@QEAA@XZ)
2>System.obj : error LNK2019: unresolved external symbol CArrayMath_mul2 referenced in function "public: class ArrayMath & __cdecl ArrayMath::mul(double)" (?mul@ArrayMath@@QEAAAEAV1@N@Z)
2>System.obj : error LNK2019: unresolved external symbol CArrayMath_div2 referenced in function "public: class ArrayMath & __cdecl ArrayMath::div(double)" (?div@ArrayMath@@QEAAAEAV1@N@Z)
2>System.obj : error LNK2019: unresolved external symbol CArrayMath_acc referenced in function "public: class ArrayMath & __cdecl ArrayMath::acc(void)" (?acc@ArrayMath@@QEAAAEAV1@XZ)
2>System.obj : error LNK2019: unresolved external symbol CArrayMath_result referenced in function "public: class DoubleArray __cdecl ArrayMath::result(void)const " (?result@ArrayMath@@QEBA?AVDoubleArray@@XZ)
2>System.obj : error LNK2019: unresolved external symbol CArrayMath_max referenced in function "public: double __cdecl ArrayMath::max(void)const " (?max@ArrayMath@@QEBANXZ)
2>System.obj : error LNK2019: unresolved external symbol CArrayMath_sum referenced in function "public: double __cdecl ArrayMath::sum(void)const " (?sum@ArrayMath@@QEBANXZ)

Can't double click on error to get the associated line of code etc.

Any thoughts???  Please let me share my gracious thank you in advance.

Cheers - Dynotoe
0
Dynotoe
Asked:
Dynotoe
  • 2
  • 2
1 Solution
 
WerrockCommented:
The warning might get solved by going to Project -> Properties -> C/C++ -> General and turn off the option that says "Detect 64-bit Portability Issues."

The error are linker error. You are missing some lib in you linker input. But I don not know what one, I do not recognise what it is.
0
 
DynotoeAuthor Commented:
Hi Werrock,

The linker warnings don't show up when doing a 32bit build.  Also I checked the "Detect 64-bit....." and it is already set to "No"..

-D
0
 
WerrockCommented:
Then I guess that all your link errors are caused by you using a 32-bit library. You need to link with 64-bit libraries to make it work. CMultiChart_addChart and all C-something functions are non standard libs and you need the 64-bit version of it.

If you feel confident you could remove the warning with:
#pragma warning(disable:4267)
0
 
DynotoeAuthor Commented:
Thanks.

Be well.

-D
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now