Originally posted by: michael.chu@amd.com
There are bound to be a few gotchas and that's what we are here for. 🙂 I apologizes for the difficulties you've been having. Hopefully I can help you get up and running quickly. 🙂
Thank you, I appreciate it!
When you added $(BROOKROOT)\sdk\include to Project Properties->Configuration Properties->C/C++->Additional Include Directories, did that make the "cannot open include file: 'brook/brook.hpp'" error go away?
Yes. It would be a big help to all, I assume, if this was included in the documentation if it's not already. I didn't see it in the Brook+ docs. Did I miss it somewhere?
Also, make sure BROOKROOT has been set properly. It should be been done for you with the installer. Go to Start->Run and run "cmd". Type: "echo %BROOKROOT%" and make sure it is pointing to C:\Program Files\AMD\BROOKPLUS SDK v1.00.0_alpha\
This was setup correctly by the installer, no problems there.
The include path is something you need to add to all of your projects manually. MSVS has no way of knowing you want that path in your include path vs. some other path. If it put it in automatically, you might end up getting conflicts between 2 different packages which have similarly named include files. Then, it would be which ever include path was first which wins. No desireable behaviour.
Again, if this is true it would be helpful if this was noted in the documentation, if it isn't already.
The only way for this to be automatically in your include paths would be if we installed Brook+ and CAL include files and library file directly into your MSVS directories which wouldn't be a very clean thing to do. We prefer to keep our files separate so it makes for easy updates, etc.
Understand . Once again, documentation would be very helpful.
Also, as far as the linking is concerned (the LNK2019 error), do you have Project Properties->Configuration Properties->Linker->Input->Additional Dependencies set to "$(BROOKROOT)\sdk\lib\brook.lib"? You need to make sure the double-quotes are there. BROOKROOT, as it is setup by default, has spaces in its resolution. This will confuse MSVS and it will end up thinking there are 2 dependencies there (it seems to handle spaces in the resolution of BROOKROOT for the include path for some reason).
Thank you, this took care of that problem. The documentation states to do it for the .br properties but doesn't say this must be done for the Project properties. Also, is the double quotes just a MSVS thing? I haven't really used MSVS that extensively until now. It would be helpful if the screenshot on page 9 of the Brook+ Programming Guide also had this line included.
Give that a try and let me know how it goes.
Thank you for your time.
Michael.
Originally posted by: ryta1203
I continue to get LNK2005 errors, but only when I build my solution. It says that "my_function" is already defined in "filename".obj
I have created a "wrapper" file, that is I have a .cpp with my main and a .br file, I then call the created br->cpp file from my main cpp file. If the solution is trying to build all of these will this create an already defined? I mean, there is a "my_function" in the .br file and then again in the created br->cpp file.
How do I get around this?