Csound Csound-dev Csound-tekno Search About

[Csnd] Possible machine type incompatibility?

Date2021-08-15 03:46
FromJana Cole
Subject[Csnd] Possible machine type incompatibility?
I'm trying to compile the code below in Visual Studio, and I'm getting this warning about machine type. Is it related to the fatal error?
Is the fatal error referring to the library?
 
C:\Program Files\Csound6_x64\lib\csound64.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
1>C:\jana\csound\projects\csound_api_test\Debug\csound_api_test.exe : fatal error LNK1120: 140 unresolved externals
1>Done building project "csound_api_test.vcxproj" -- FAILED.

#include "csound.hpp"

int main(int argc, const char** argv)
{
	Csound* cs = new Csound();
int result = cs->Compile(argc, argv);
	if (result == 0)
	{
		result = cs->Perform();
	}
	return (result >= 0 ? 0 : result);

}







***************************
Thoughts are Things
***************************

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-08-15 04:54
FromForrest Curo
SubjectRe: [Csnd] Possible machine type incompatibility?
If the program is using machine-instructions appropriate to a fully-64-bit computer, on a machine that only uses 32-bit instructions for some of those operations, yes, that would almost certainly crash the program.


On Sat, Aug 14, 2021 at 7:46 PM Jana Cole <quikscor@ix.netcom.com> wrote:
I'm trying to compile the code below in Visual Studio, and I'm getting this warning about machine type. Is it related to the fatal error?
Is the fatal error referring to the library?

C:\Program Files\Csound6_x64\lib\csound64.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
1>C:\jana\csound\projects\csound_api_test\Debug\csound_api_test.exe : fatal error LNK1120: 140 unresolved externals
1>Done building project "csound_api_test.vcxproj" -- FAILED.

#include "csound.hpp"

int main(int argc, const char** argv)
{
        Csound* cs = new Csound();
int result = cs->Compile(argc, argv);
        if (result == 0)
        {
                result = cs->Perform();
        }
        return (result >= 0 ? 0 : result);

}







***************************
Thoughts are Things
***************************

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-08-15 10:13
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Possible machine type incompatibility?
I think you just need to select to build an x64 project configuration in Visual Studio. It can do both, but Csound is a 64 bit library, so it won't work with 32 bit programs.

Just get rid of the 32 bit configurations, you won't need those.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On Aug 15, 2021, at 3:47 AM, Jana Cole  wrote:
> 
> *Warning*
> 
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> 
> I'm trying to compile the code below in Visual Studio, and I'm getting this warning about machine type. Is it related to the fatal error?
> Is the fatal error referring to the library?
> 
> C:\Program Files\Csound6_x64\lib\csound64.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
> 1>C:\jana\csound\projects\csound_api_test\Debug\csound_api_test.exe : fatal error LNK1120: 140 unresolved externals
> 1>Done building project "csound_api_test.vcxproj" -- FAILED.
> 
> #include "csound.hpp"
> 
> int main(int argc, const char** argv)
> {
>        Csound* cs = new Csound();
> int result = cs->Compile(argc, argv);
>        if (result == 0)
>        {
>                result = cs->Perform();
>        }
>        return (result >= 0 ? 0 : result);
> 
> }
> 
> 
> 
> 
> 
> 
> 
> ***************************
> Thoughts are Things
> ***************************
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C0f33afee5920411c02bb08d95f96f2ec%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637645924200591991%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yDDtX8CZmNfDPSt1XmzFJGLLjwEtC8sPlagmBDfhC9U%3D&reserved=0
> Send bugs reports to
>        https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C0f33afee5920411c02bb08d95f96f2ec%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C1%7C637645924200591991%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=XDUc%2BWHu5NGFPqPHKxfmBONhV17d8pJuV8nkwBp7KZk%3D&reserved=0
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2021-08-15 13:48
FromMichael Gogins
SubjectRe: [Csnd] Possible machine type incompatibility?
Yes. x86 is 32 bit CPU architecture, x64 is 64 bit CPU architecture. Is it possible that you have a 32 bit CPU  only architecture version of Windows? 64 bits is now standard for Csound and most software. If you have a 64 bit version of Windows than change your project options to target x64.

On Sat, Aug 14, 2021, 22:46 Jana Cole <quikscor@ix.netcom.com> wrote:
I'm trying to compile the code below in Visual Studio, and I'm getting this warning about machine type. Is it related to the fatal error?
Is the fatal error referring to the library?

C:\Program Files\Csound6_x64\lib\csound64.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
1>C:\jana\csound\projects\csound_api_test\Debug\csound_api_test.exe : fatal error LNK1120: 140 unresolved externals
1>Done building project "csound_api_test.vcxproj" -- FAILED.

#include "csound.hpp"

int main(int argc, const char** argv)
{
        Csound* cs = new Csound();
int result = cs->Compile(argc, argv);
        if (result == 0)
        {
                result = cs->Perform();
        }
        return (result >= 0 ? 0 : result);

}







***************************
Thoughts are Things
***************************

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Date2021-08-15 14:04
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] Re: [Csnd] Possible machine type incompatibility?
I think it is more likely that she is using an x86 configuration in VS. I noticed that last year when I was helping some students who had Windows machines. When you start a new project, VS creates configurations for both architectures and tries to build for both, failing miserably if you added a 64bit library to the project. It's very confusing if you are only starting up with using VS and programming.

Prof. Victor Lazzarini
Maynooth University
Ireland

On Aug 15, 2021, at 1:49 PM, Michael Gogins <michael.gogins@gmail.com> wrote:



*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Yes. x86 is 32 bit CPU architecture, x64 is 64 bit CPU architecture. Is it possible that you have a 32 bit CPU  only architecture version of Windows? 64 bits is now standard for Csound and most software. If you have a 64 bit version of Windows than change your project options to target x64.

On Sat, Aug 14, 2021, 22:46 Jana Cole <quikscor@ix.netcom.com> wrote:
I'm trying to compile the code below in Visual Studio, and I'm getting this warning about machine type. Is it related to the fatal error?
Is the fatal error referring to the library?

C:\Program Files\Csound6_x64\lib\csound64.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
1>C:\jana\csound\projects\csound_api_test\Debug\csound_api_test.exe : fatal error LNK1120: 140 unresolved externals
1>Done building project "csound_api_test.vcxproj" -- FAILED.

#include "csound.hpp"

int main(int argc, const char** argv)
{
        Csound* cs = new Csound();
int result = cs->Compile(argc, argv);
        if (result == 0)
        {
                result = cs->Perform();
        }
        return (result >= 0 ? 0 : result);

}







***************************
Thoughts are Things
***************************

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here