Apr 06, 2015 I try to compile my source file (file.cu) with nvcc on mac OSX. I use instruction: $ nvcc file.cu -o file but I get the following output Undefined symbols for architecture x8664.
Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented Jul 10, 2017
Is this a bug report?Yes Have you read the Bugs section of the Contributing to React Native Guide?Yes Environment
Then, specify:
Steps to Reproduce
Expected BehaviorI expect the react-native run-ios to build the app properly! Actual BehaviorReproducible DemoI'm not sure how to easily reproduce this, other than telling about our setup. |
commented Jul 11, 2017 • edited
edited
same issue in my project... |
commented Jul 11, 2017
commented Jul 11, 2017 • edited
edited
+1 |
commented Jul 11, 2017
+1 |
commented Jul 11, 2017
You need to add a dependency on the RCTBatchedBridge subspec (if using 0.46) or RCTCxxBridge (if newer). |
commented Jul 17, 2017
In my case (0.46.3), I added React/BatchedBridge into the dependencies in Podfile and the problem went away. |
commented Jul 18, 2017 • edited
edited
Adding |
referenced this issue Jul 18, 2017
ClosedError #15049
referenced this issue Jul 28, 2017
ClosedAdd missing subspec part #15264
added a commit to GantMan/react-native that referenced this issue Jul 28, 2017
Add missing subspec part
commented Aug 4, 2017
commented Sep 18, 2017
@RobertWSaunders Saved my night, thanks ;) |
commented Oct 12, 2017
BatchedBridge is deprecated. |
commented Oct 18, 2017
The following should work: Replace I'm sticking with |
commented Dec 10, 2017
Adding CxxBridge as suggested by @Zyphrax worked for me. My podfile for 0.51: |
commented Dec 16, 2017 • edited
edited
Adding |
commented Dec 16, 2017
This makes me crazy. Any one can tell me what is wrong with my Podfile. |
commented Dec 17, 2017
God bless! This morning I rebuilt my project with the same |
commented Dec 17, 2017
@MemoryReload Yeah, when in doubt, remove npm/yarn lockfiles, remove |
commented Dec 19, 2017
@Zyphrax Yarn is too important for reat-native, I think. |
referenced this issue Dec 22, 2017
ClosedUndefined symbols for architecture x86_64: #17320
commented Jan 18, 2018
i still face this error |
commented Jan 25, 2018 • edited
edited
+1 |
commented Jan 26, 2018 • edited
edited
+1, it only happend when i archive the project, i can successfully run and build it but when it comes to archive there are the following errors |
commented Jan 26, 2018
@calcal12 If you sure that you have the correct settings in your project |
commented Mar 3, 2018
@calvinkei Did you resolve this? Any idea? |
commented Mar 9, 2018
Check here: #15838 (comment) |
referenced this issue Mar 9, 2018
ClosedNot able to generate archive when using a Pod file #14749
commented Mar 9, 2018
@BenBach I eventually started a new react native project and transfer all my js code, and install every native module one by one again, it works but it is painful |
commented Mar 9, 2018
@calvinkei Are you using cocoapods? And have both debug build and archive working? |
commented Mar 13, 2018
I now have debug, release and archive working. Using two targets. The second one is a duplicate with the react modules manually linked as well, allowing the debug build to work. While the first one only links the libPods. This way the pod installation doesn't issue any warnings, and the target.remove_from_project part can be removed. |
locked as resolved and limited conversation to collaborators Jul 12, 2018
I'm making my app more portable to run on other OS's. Works in XCode and Visual Studio. However, switching to Makefiles is causing me some problems.
Error:
Main.cpp
AppObject.hpp
AppObject.cpp
This is paired down a bit but I am seeing some other warnings also of:
Can anyone help me understand my mistake and my this works in XCode and VS but not using make?
Makefile
Full make output:
Updated make
output after taking advice from replies:
1 Answer
To begin with, clang
is the C frontend. While it can be used to compile C++ code, it will not add all header paths or linker libraries needed for C++. Use clang++
.
Secondly, the output you show is without any flags at all.
Thirdly, and the reason for your linker error, is that you don't use the -c
flag which is needed to create object files. Without the -c
flag, you tell the clang
frontend program to build and link an executable file named scraper/main.o
.