opp_run error on omnetpp IDE - omnet++

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.

Related

Odd python driver files in micropython for esp32 and esp8266 cause make errors

I've been trying to build a micropython for esp32-camera and I keep getting errors during the make process when building some of the drivers in the mp/ports/esp32/modules directory. The error I get is a syntax error. For example there's a file named ntptime.py in this directory and it contains a single line:
../../esp8266/modules/ntptime.py
and that results in "SyntaxError: invalid syntax"
I've programmed python for a while, but am not familiar with this concept and don't understand how it can work, but maybe it can? I'm not familiar with doing that and since it's not working when I run make, maybe there's something setup-wise that I've missed or whatever. Can anyone shed some light on this practice and explain under what circumstances this works to direct make (or the python compiler) to resolve this statement by loading the source from the directory specified in that single line of code.
Duh, can't believe I missed this: there "files" are symbolic links; I should've remembered that, but alas, I'm getting older by the minute!
Still, it doesn't answer the question as to why they weren't being recognized during make but instead throwing a SyntaxError; but I'll leave that for another day.

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.

lexical and preprocessor issue in testing kit.h file? Xcode 4 testing files

I'm 14 and kind of new to Xcode 4.6, so I really don't know much about it. When I was working on my app, I got an error out of nowhere saying lexical and preprocessor issue in my .h test files. I didn't type anything on that file and every time I start over, it pops up. It also says my importing files aren't found? I didn't import anything except for the project already. How do I fix it?

WDL-OL: resource not found

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

Xcode shows many errors but program compiles and runs fine (in both simulator and device)

After installing the CocoaLumberjack' log compressor class I've been getting this annoying behavior: Xcode complains that there are many undeclared identifiers and gives me many errors (not warnings but errors with the red icon).
The thing is that I can compile and run my iPad app just fine but Xcode won't do any autocompletion. I tried cleaning the build folder (Product > option + Clean), and also deleting derived data. I've also rebooted to no avail.
As you can imagine this is a pain to work with. I did have this behavior happen before on a previous version of Xcode; it had something to do with stuff in my precompiled headers file but using the solution above would always fix it. I'm currently using Xcode 4.4 (4F250).
Sample error I'm getting:
Semantic Error: use of undeclared identifier 'DDTTYLogger'
The above happens even with classes that I wrote myself and that have not changed since installing the CocoaLumberjack compressor class.
I finally solved this after MANY attempts using the following:
Remove the last #import from my Prefix.pch and build again. Errors would happen (obviously). Put the line back and build again. No errors would show and after 10 seconds or so, errors would come back again.
Repeat the above except instead of the last #import, remove the last TWO imports, then three, four, etc. I did this until I removed five imports and when I put them back and waited, Xcode stopped complaining.
Note that this didn't occur to me at all. I read this solution on a blog somewhere.
Weird bug...
Open build settings and set "Precompile Prefix Header" to "No", that solved my problem.
Kudos for: https://stackoverflow.com/a/7035492/936957
I've been running into these issues constantly on all the latest versions of Xcode, in both Objective-C and Swift.
I noticed today that I was getting the errors in one particular class file. I removed it from some extra targets it was in and the errors finally went away!
I think Xcode has some fundamental bugs with it's handling of multiple targets right now. My theory is that if the other target is not built, you will essentially see errors from that target. Anyway hope this helps someone.
Not bad,
If you follow these Steps-
1-Clean Xcode(Cmd+Shif+K).
2- Clear Derived Data(Cmd+Shift+G).
Enter this path( ~/Library/Developer/Xcode/DerivedData/).
3- Quit and open again Xcode.
This problem can cause by setting "Target Membership" for some files are not the same.
Example:
A class XYZ put in file "a.swift" and it's used in file "b.swift". But "Target Membership" setting of "a.swift" is not the same "Target Membership" setting of b.swift.
Check "Target Membership" setting as below:
I was having issues with a library installed via cocoapods. Going to Build Settings and searching for 'Allow Non-modular Includes In Framework Modules' then setting it to Yes did the trick.
I had it on Xcode 10.1 when I accidentally pressed:
Cmd+Shift+U - ( build for Testing )
try Clean (Cmd+Shift+K) and then:
Cmd+Shift+R ( build for Running )
After update to Xcode 11, I met the same problem. I tried all the mentioned advices (cleaning folders, turning on/off different settings, restarting xCode), but nothing helped. Also, I have a big project in C, so, I'd like to keep using precompiled headers.
Finally I found that simple restart of Mac OS solves the problem! It's really weird behaviour, but I'm happy anyway that I found a solution – it's hard to code when lots of colourful error messages float around.
For me it helped cleanning the project. XCode->Product->Clean
I got the similar type of issue.
Alternate option to fix this is
Open organizer and delete the derived data of your project or delete all the projects in organizer projects tab. It works fine..
I just had the same thing in Xcode 5.1.
I fixed it by making sure there were no blank lines between #import's
I have removed some extra spaces and extra lines from .pch file and it xcode stopped complaining
This happened to me as well, but cleaning didn't fix it. What did was quitting and reopening XCode. Afterwards, all the phantom errors were gone. For those wondering, the tabs you have open when you close will still be open when you reopen.
I had this issue recently. It can be remedied in some cases by deleting the ModuleCache folder inside DerivedData, along with the project folder in DerivedData. Note that Xcode must be quit before doing this.
Running on Xcode Version 10.1 (10B61), I set the build setting "Increase Sharing of Precompiled Headers" to NO. I was working in an .xcworkspace with many projects sharing the same frameworks, and no Objective-C bridging header (meaning I've added no obj-c code myself). I'm not sure when Xcode did away with .pch files by default, but I didn't have any of those in my project.
Open up a terminal and create a nice little function accessible via the command line...
nano ~/.bashrc
add (making the necessary substitutions between the pointy braces)
cycle() {
git stash save "BACKUP"
git checkout <<SOME OTHER BRANCH>>
git branch -D $1
xcodebuild -allowProvisioningUpdates -workspace <<YOUR WORKSPACE>>.xcworkspace -scheme <<YOUR SCHEME>> -configuration Release clean
git checkout $1
}
^X and save it by following the prompts, then enter source ~/.bashrc to make it visible to the current terminal session.
Make sure your branch is pushed to origin, cause we're going to delete it :)
Call the function using cycle <<MY BRANCH>> (once it's run you might want to call git stash pop to restore any working copy changes)
Hope it works for you! Xcode, get on your game!
In my case (mixed objc/swift project) at least part of errors were caused by absence of imports for some used frameworks, e.g. "import UIKit". Project was compiled successfully because frameworks were anyway included in headers in Prefix.pch file. But errors were shown, for example about not finding method defined in UILabel extension, and yes, this extension was without "import UIKit". So I think these errors in most cases depends on Prefix.pch precompilation/updating.
Touching Prefix.pch, cleaning, removing derived data, closing/opening XCode sometimes helps, but not always.
Using SPM, it can be that the Module you import, which you use at the location of the errors, has missing dependencies itself.
In my case I had an error about a missing initializer, XCode trying to use a different one than the one already defined in the other Module. But the project compiled fine! Nothing worked at first. Then I tried first cleaning, and then Product -> Perform Action -> Compile "myfile.swift" and it showed what the missing dependency in the dependency was! Note: This goes recursive. In multiple places a depenendency may have not been declared in the package.swift -> compile the same file repeatedly until it compiles successfully.
So.. it wasn't that the module with the error had a missing dependency, but rather that the direct dependency did miss a Module-dependency declaration in its package.swift declaration.
My explanation is that to generate the Error-output of XCode, Modules get compiled alone on their own. Import errors then show up. But when Modules are built as part of a larger Module, then that large module may import the missing dependency of the broken sub-Module already, making the build pass.

Resources