WDL-OL: resource not found - macos

i'm trying to build a simple Audio plugin using WDL-OL (a library that helps porting the plugin on various platforms) on OSX. The plugin builds ok on Windows
as soon as it tries to load a resource background file, i got an ASSERT warning that the file isn't found
1 my files are present in the Copy Bundle Resources part
2 i've tried all kind of combinations with/without subfolder, with caps or not
i'm lost there i don't get why it doesn't find the file
if i create a simple test it works, it finds the file knob.png but with my project it doesn't work
also if i point to the file knob.png (that should work), it doesn't work in my new project, so my guess is that it isn't the png files that are wrong. It comes from somewhere else...
here is what i used in the resource.h:
#define BCKG_ID 102
#define BCKG_FN "resources/img/background2.png"
and i call the background using this code :
pGraphics->AttachBackground(BCKG_ID, BCKG_FN);
please help, thanks
Jeff
EDIt1 : okay i found something interesting
in MyProject-OSXAPP-Info.plist, "Bundle Identifier" is set to : com.Khaelis.standalone.${BINARY_NAME}
but if i stop the program at the function LoadImgFromResourceOSX(...) and look at the variable "bundleID", it shows:
"bundleID = com.Khaelis.standalone.test"
even if i entered another BINARY_NAME (in MyProject.xcconfig)
how come ? the compiler doesn't apply the name i put.
the variable "bundleID" should be com.Khaelis.standalone.PerfectEQ not com.Khaelis.standalone.test
is there a file that i should update?

ok found it
if you ever encounter this kind of error (resource not found) check if the Bundle Name (in resource.h) and BINARY_NAME (in Project.xcconfig) are the same
then it should work
Jeff

Related

opp_run error on omnetpp IDE

I'm working on a veins project at the moment and everything went fine till today.
I had the need to add a new module to the ' veins/src/veins/modules ' directory so I simply created a new folder and put some .ned files and relative header/source files in there. I got some errors after doing that but nothing special (I was probably doing something wrong and compiler didn't like it). I then decided to delete the folder and try again maybe the day after.
After doing so I re-run the same exact simulation and omnet/IDE started showing this, not being able to launch:
<!> Error: Cannot load library '../../src//libveins.so': ../../src//libveins.so: undefined symbol: _ZN8Flooding6finishEv
End.
Simulation terminated with exit code: 1
I've tryed a fresh clean and rebuilt the whole veins project but that didn't help.
I googled this error but couldn't find anything similiar to my case.
Thanks in advance for your help.
Best regards.
c++filt _ZN8Flooding6finishEv shows that the missing symbol is
Flooding::finish(). It seems that you have a deceleration of this
method but missing a corresponding implementation. I'd assume your
module was called Flooding and you did not delete all of it when
starting over.
Julian Heinovski
Running the same configuration on Windows showed that it was indeed Flooding::finish() not implemented (that's probably because it's automatically demangled on Windows). I just deleted the declaration and solved my little inattention.

Getting started with wxWidgets and VisualStudio

I want to build C++ desktop applications using visual studio and wxWidgets on windows 7. I'm coming from C++ Builder.
I downloaded and built the wxWidgets libraries successfully and I can run the minimal_vc14 solution just fine. Now it comes time to create my Hello World app. I've created a new, empty C++ project and using NuGet added the wxWidgets template. Then I use class wizard to add a new class (Test3) with a base class of wxApp.
I immediately get 45 errors. The first of which is
Severity Code Description Project File Line Suppression State
Error (active) cannot open source file "../../../lib/vc_dll/mswud/wx/setup.h" Test3 c:\wxWidgets-3.1.0\include\msvc\wx\setup.h 121
digging into that file I find the following bit. The last include statement is the problem line identified above, but the problem I think is in the wxConcat6 statement. All of those ../ lead nowhere. Shouldn't that point to $(WXWIN)?
// the real setup.h header file we need is in the build-specific directory,
// construct the path to it
#ifdef wxSUFFIX
#define wxSETUPH_PATH \
wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h)
#else // suffix is empty
#define wxSETUPH_PATH \
wxCONCAT5(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, /wx/setup.h)
#endif
#define wxSETUPH_PATH_STR wxSTRINGIZE(wxSETUPH_PATH)
#include wxSETUPH_PATH_STR
Also, smaller problem but further up the setup.h file I see that WXUSINGDLL has been defined, but I want to use libs. I can't figure out where that is being set either.
Obviously there is a configuration step I missed somewhere. Please advise.
As usual the answer can be found by reading EVERYTHING.
There are 2 things that need to be configured for this process to work correctly.
After creating the project go to the project properties and set the character set to Unicode. The default is Multi-Byte. My next quest will be to find where to change the default!
After installing the package template (or is it a template package?) go to the project properties and set shared to "statically linked build".
Presto changeo, you are ready to go. Add the following for the absolute minimum to make a compilable application. This is based on the tutorial here:creating-wxwidgets-programs-with-visual-studio-2015
bool MyProjectApp::OnInit()
{
wxFrame* mainFrame = new wxFrame(nullptr, wxID_ANY, L"MyProject");
mainFrame->Show(true);
return true;
}
wxIMPLEMENT_APP(MyProjectApp);
I suggest you make a copy of minimal sample (or widgets, as it uses more controls and links more libs), in the same location, and modify the source file as you need.
When you have played enough with it, for sure you'll find it quite easy to change the project file so that it'll use $(WXWIN) or any other custom settings.
p.s. I don't know what "wxWidgets template" from NuGet contains, but I strongly doubt it is provided by wxWidgets maintainers.

Linker command failed with exit code 1 (duplicate symbol)

I developing a game in Unity and I have used Admob, Facebook and GameCenter in it. It was working fine on iOS until I have added the OpenIAB for in-app purchase, though it works fine in Unity Editor.
I am getting this error in xcode:
duplicate symbol __Z14MakeStringCopyPKc in:
/Users/UmerAzeem/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejwaywhkiokzjofdpwnbebkbleai/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FBUnityUtility.o
/Users/UmerAzeem/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejwaywhkiokzjofdpwnbebkbleai/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/AppStoreDelegate.o
ld: 1 duplicate symbol for architecture armv7 clang: error: linker
command failed with exit code 1 (use -v to see invocation)
See error screenshot here
I have tried almost all the solution that I could find over the internet, but still don't understand how can I remove this duplication error, I have tried looking for duplicate files too, but it also went in vain, someone help me out of this, would appreciate it.
Thanks.
Look up in your project for:
MakeStringCopy
And make sure it exists (if exists) only once. If it appears more then once, rename one (make sure to rename it where it being called as well) and try to build again.
I have recently face the same issue. I know Umer Azeem got the answer but to help someone else who may suffer from the same issue I was in.
According to my application flow I am using printer related third party class to print. To use that I have created object of that class in both of my files ImagePrintViewController and PrintResultViewController separately and passed required data to it.
In my scenario I am getting same error with variable name like _printerSetup in two of my files/Library/Developer/Xcode/DerivedData/../x86_64/ImagePrintViewController.o
and /Library/Developer/Xcode/DerivedData/../x86_64/PrintResultViewController.o.
I have search in both of my file for the above variable name. But I couldn't find that.
After searching long on this I got a idea to delete reference of my second file i.e. BRPrintResultViewController.h and BRPrintResultViewController.m after merging code in my first file.
With this I found my solution and my code runs fine after this.

Strange DWT-controls style

I'm using DWT from the GitHub repository (the latest version) with recomended building parameters for Windows:
dmd "myGuiApp.d" -IC:\\D\\dwt\\imp ^
-JC:\\D\\dwt\\org.eclipse.swt.win32.win32.x86\\res ^
-L+C:\D\dwt\lib\ -L+org.eclipse.swt.win32.win32.x86.lib ^
-L+dwt-base.lib -L/SUBSYSTEM:windows:4
The GUI applications may run on Win XP and Win 7, but the DWT-controls style is like from the older Windows versions like it was on Win 98 (without color gradient on the buttons, with strict corners). My first idea was to change parametr SUBSYSTEM to windows:5 or windows:6, but it didn't help. And I failed to find any mention about similar problems in google.
So maybe anyone knows or guesses, what am I doing wrong?
You probably need a manifest for the exe and might have to call InitCommonControlsEx (I don't know if DWT does this or not; I've never actually used it) http://msdn.microsoft.com/en-us/library/windows/desktop/bb775697%28v=vs.85%29.aspx
The manifest is explained here, along with an overview of how to do it:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175%28v=vs.85%29.aspx
The manifest is the XML stuff a bit down on that page. The D compiler doesn't have the pragma to add the xml right in, but you can compile it into a resource file or just name the XML file yourexename.manifest and put it in the same directory as the exe.
From the MSDN link:
"Manifests are written in XML. The name of the application manifest file is the name of your executable followed by the file name extension .manifest; for example, MyApp.exe.manifest. The following sample manifest shows that the first section describes the manifest itself. The following table shows the attributes set by the assemblyIdentity element in the manifest description section."

vb6 user-defined type not defined error on full compile

I have some vb6 code I have not compiled in a long time. The last compile is in production. Now I get an error "User-defined type is not defined" when I do a full compile. I'm sure there is a reference missing. But there is no code that is hi-lighted. And I cannot seem to find what reference might be lost.
Any clues as to what I can do to find the missing reference would be very helpful.
Thanks!
Dave
I've had that happen before it drove me crazy!! But then I found this:
 
http://support.microsoft.com/kb/190197
 
Occurs when compiling with binary compatibility on. The above solution suggests turning off binary compatibility and re-compiling - then missing reference will then be highlighted.
Other steps you can try:
Rather than turning off BC for everything look for ones that have
been recently changed
search C: drive and dev folder and delete any
*.oca files
also look in the vbp file for any oca references
You need to ensure that you have the appropriate items checked in the References dialog. This is outside the code and they are listed in the VBP file (text file).
EDIT Corrected reference storage. Thanks MarkJ
Make sure all of your object types are spelled right. A simple error like spelling Variant Varient can cause this error as well.
Are you still using the same machine in which the original compile was made and / or with the same OS
?
If the answer is no, then there is a chance that VB6 or its like linked to a reference which is no longer available in Win7 or later, this may also include the compiler if you are using a modern version of studio.
Since the code is also in VB6, if you are using any outside commercial controls, and again if not on the same machine, you would loose those links as well if you did not port over the library.

Resources