Jump to content
  • Advertisement
Sign in to follow this  
fyigit

general purpose computations on GPU & VS.NET

This topic is 4874 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi... I am working with brook language to realize some general purpose computing on GPU... I compile my "mathlib.br" brook file with "brcc" brook compiler and get "mathlib.cpp" file after compilation. After I get "mathlib.cpp", I add it to my VS.NET project. But when I add "mathlib.cpp" to my project and then built, some link errors occured. Can you explain me how to add my "mathlib.cpp" file into my VS.NET project successfully... (what kind of arrangements do i have to make on the link properties of my project in VS.NET or anything like ) THANKS...

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Can you explain me how to add my "mathlib.cpp" file into my VS.NET project successfully...


Just add it to the list of source files for the project. IIRC, right click in the project browser and select "add existing file".

Share this post


Link to post
Share on other sites
Oh I think I can not explain my problem briefly...

I add my "mathlib.cpp" file to my project by using "AddExistingItem". After I add, I try to built my project but it gives link errors. I arrange the paths but can not succedded :(

Is anyone try such a thing?

Thanks...

Share this post


Link to post
Share on other sites
simply my .cpp file is like that:

int oct=20;
float *Frequency;
float *Persistence;

int Cloud_main(int argc, char* argv[]) {

float P=0.5f;
int i;
int fin; //color info
int cidx; //index of a pixel

Frequency = (float*)malloc(oct*sizeof(float));
Persistence = (float*)malloc(oct*sizeof(float));

Frequency[0]= 0.05f;
Persistence[0]= 0.5f;

for(i=1; i<oct; i++)
{
Frequency = Frequency[i-1] * 2;
Persistence = Persistence[i-1] * P;
}

return 0;
}

after I add this file to my project and then built I hav got the following link errors:

LIBCD.lib(dbgheap.obj) : error LNK2005: _malloc already defined in MSVCRT.lib(MSVCR71.dll)

LIBCD.lib(dbgheap.obj) : error LNK2005: _free already defined in MSVCRT.lib(MSVCR71.dll)

LIBCD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall exception::exception(void)" (??0exception@@QAE@XZ) already defined in MSVCRT.lib(MSVCR71.dll)

LIBCD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall exception::exception(class exception const &)" (??0exception@@QAE@ABV0@@Z) already defined in MSVCRT.lib(MSVCR71.dll)

LIBCD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall exception::~exception(void)" (??1exception@@UAE@XZ) already defined in MSVCRT.lib(MSVCR71.dll)

LIBCD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall bad_cast::bad_cast(char const *)" (??0bad_cast@@QAE@PBD@Z) already defined in MSVCRT.lib(MSVCR71.dll)

LIBCD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall bad_cast::bad_cast(class bad_cast const &)" (??0bad_cast@@QAE@ABV0@@Z) already defined in MSVCRT.lib(MSVCR71.dll)

LIBCD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall bad_cast::~bad_cast(void)" (??1bad_cast@@UAE@XZ) already defined in MSVCRT.lib(MSVCR71.dll)

So what is the problem?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!