Basic C function ends up with error when trying to compile + example
Hello Guys,
Gotta problem here with normal function in c:
My configuration:
OS 10.8
Xcode 5.0.2
Code:
void printMessage (void) {
NSLog(@"Test");
printMessage();
Note that this ends up with error:
ProcessPCH /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.pch test/test-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/cistyprofil/Documents/CA/test
setenv LANG en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/ SDKs/MacOSX10.8.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.8 -g -Wno-sign-conversion -iquote /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-generated-files.h map -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-own-target-head ers.hmap -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-all-target-head ers.hmap -iquote /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/test.build/Debug/test.build/test-project-headers.h map -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Products/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchai n/usr/include -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/DerivedSources/i386 -I/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Intermediates/test.build/Debug/test.build/DerivedSources -F/Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqr xzfkcygoghf/Build/Products/Debug --serialize-diagnostics /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.dia -MMD -MT dependencies -MF /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.d -c /Users/cistyprofil/Documents/CA/test/test/test-Prefix.pch -o /Users/cistyprofil/Library/Developer/Xcode/DerivedData/test-butpvmdeqxfberfqrxz fkcygoghf/Build/Intermediates/PrecompiledHeaders/test-Prefix-bjoindrfwbhakucgefd kktxqsafj/test-Prefix.pch.pch
error: -fobjc-arc is not supported on platforms using the legacy runtime
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ usr/bin/clang failed with exit code 1
Please advise.
Try this to start with:
#include <stdio.h>
int main(int argc, const char * argv[])
// insert code here...
printf("Hello, World!\n");
return 0;
This is the default source code you see when you create a command line tool using XCode.
Similar Messages
-
Error when trying to compile HTML help
I'm using RoboHelp 7.0 on Windows XP. All of the sudden, last
week, I start getting the following error when I try to compile
"Fatal Error: Unexpected error from Microsoft HTML compiler." I've
read the other posts regarding this error and deleted the .CPD file
multiple times and tried to compile again still with no success.
I've uninstalled and reinstalled multiple times and not had any
better results. The other author in my office can check the project
out of RoboSource and compile it fine. I have it on my local drive
when trying to compile.
I'd appreciate any ideas. It doesn't make sense that is
something in the project since my other author can compile it fine.
Thanks,
NitaHi, Nita,
Do you have any other RoboHelp projects that you can try
compiling? This may help to determine whether there's something
slightly askew about this particular project — sounds
unlikely if your colleague can compile without error — or
whether the problem lies in your RoboHelp installation.
I'd also recommend that you run MJ's Help Diagnostics,
available from the address below. This will verify that all the
HTML Help viewer and compiler components are properly installed and
registered on your machine.
http://helpware.net/downloads/index.htm#MJs
Pete -
Suffering an complie error when trying to compile java class in EBS11i
Hi,
When I trying to compile java classes with which imported the HttpServletResponse class, will get the follow error message:
package javax.servlet does not exist
cannot resolve symbol
symbol : class HttpServletResponse
It seems the javax.servlet package is not included in the classpath. But I checked the $CLASSPATH, it seems no problem.
echo $CLASSPATH
/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/lib/tools.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/lib/dt.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/charsets.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar:/u02/applvis/viscomn/java/appsborg2.zip:/u02/applvis/visora/8.0.6/forms60/java:/u02/applvis/viscomn/java
Does anyone know the reason?
environment: ebs 11i
Thanks&Regards,
Xiaofengresolved this issue.
1. Edit $APPL_TOP/admin/adovars.env file -
Add the following jar files to the AF_CLASSPATH line -
Full path of /...../iAS/Apache/Jsdk/lib/jsdk.jar
Full path of /...../iAS/Apache/Jserv/libexec/ApacheJServ.jar
2. Bounce the concurrent manager in order to have the changes take effect. -
Intermittant server error when trying to compile jsp.
Hi,
I'm testing my jsp on different browser versions, and on different connection
speeds, and I'm finding a consistent problem with using weblogic v6.1sp1 and slower
connections. (about 56k)
In IE 5/5.5/6, a 'This page cannot be displayed' error shows up. There is no error
in the webserver log and if you enter the url again, it will usually work, or
it might need to be entered twice.
This appears to be a jsp compilation issue, and I'm not sure if it can be resolved.
Any help would be greatly appreciated.
Thanks,
Maeve
Are you using an error page? I've seen IE do some strange things with error
pages with content less than 255 chars long!
"Maeve Loughnane" <[email protected]> wrote in message
news:3c626843$[email protected]..
>
> Hi,
>
> I'm testing my jsp on different browser versions, and on different
connection
> speeds, and I'm finding a consistent problem with using weblogic v6.1sp1
and slower
> connections. (about 56k)
>
> In IE 5/5.5/6, a 'This page cannot be displayed' error shows up. There is
no error
> in the webserver log and if you enter the url again, it will usually work,
or
> it might need to be entered twice.
>
> This appears to be a jsp compilation issue, and I'm not sure if it can be
resolved.
>
> Any help would be greatly appreciated.
> Thanks,
> Maeve
-
I get this error when trying to compile a plain C++ project
Tool:0: Couldn't run '/usr/bin/gcc-3.3' because it does not refer to an accessible executable.
I get this error when I try to compile/build a normal C++ project.
I make a new project. C++ tool. Call it "test"
It automatically makes a main.cpp file which should output "hello world" but instead I get that error above. Not sure what is going on.I'm not sure where the "verbose" icon is, but I did get this, if it helps
Native Build of Target "Test" using Build Style "Development"
CompileC build/Test.build/Test.build/Objects-normal/ppc/main.o main.cpp normal ppc c++ com.apple.compilers.gcc.3_3
cd /Users/Eric/Documents/Test
/usr/bin/gcc-3.3 -x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -g -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -ffix-and-continue -mtune=G5 -Wp,-header-mapfile,/Users/Eric/Documents/Test/build/Test.build/Test.build/Test .hmap -F/Users/Eric/Documents/Test/build -I/Users/Eric/Documents/Test/build/include -I/Users/Eric/Documents/Test/build/Test.build/Test.build/DerivedSources -c /Users/Eric/Documents/Test/main.cpp -o /Users/Eric/Documents/Test/build/Test.build/Test.build/Objects-normal/ppc/main. o
And my version of Xcode and such is..
Xcode 2.0
Xcode IDE 514.0
Xcode Core 515.0
ToolSupport 514.0
Not sure about the SDK.
iBook G4 and iPod Mini Mac OS X (10.4.5) -
[SOLVED] crt1.o error when trying to compile
Hi everybody,
I'm trying to compile a simple rtnetlink example written in c using gcc [ver 4.7.2] but I get this error :
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../../lib/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
and here is the include parts of example :
#include <sys/socket.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <arpa/inet.h>
#include <unistd.h>
Should I add a specific library or something ?! (I tried netlink and pthreads libraries and it didn't work)
thanks in advance
Last edited by bahramwhh (2012-10-09 09:34:56)@lunar oh, I'm sorry, my problem solved. my file didn't have the main function !
Last edited by bahramwhh (2012-10-09 09:35:29) -
"Symbol Undefined" error when trying to compile GPIB examples
I'm trying to compile the examples written in C that are given in the folder \VXIPNP\WinNT\NIvisa\Examples\C\Gpib. Using a standard ANSI C compiler, I get the following error messages:
AsyncIO.obj(AsyncIO)
Error 42: Symbol Undefined _viClose@4
AsyncIO.obj(AsyncIO)
Error 42: Symbol Undefined _viTerminate@12
AsyncIO.obj(AsyncIO)
Error 42: Symbol Undefined _viReadAsync@16
AsyncIO.obj(AsyncIO)
Error 42: Symbol Undefined _viWrite@16
AsyncIO.obj(AsyncIO)
Error 42: Symbol Undefined _viEnableEvent@16
AsyncIO.obj(AsyncIO)
Error 42: Symbol Undefined _viInstallHandler@16
AsyncIO.obj(AsyncIO)
Error 42: Symbol Undefined _viOpen@20
AsyncIO.obj(AsyncIO)
Error 42: Symbol Undefined _viOpenDefaultRM@
4
AsyncIO.obj(AsyncIO)
Error 42: Symbol Undefined _viGetAttribute@12
--- errorlevel 9
Any help is appreciated.Hi esi_stents,
The compiler is complaining here because it can't find the correct library file to link to. Therefore, each of the above errors are function calls that the compiler does not have a prototype for.
The library file you want to make sure to link to is visa32.lib. The path for this library file differs slightly based on what compiler you are using:
Borland: C:\VXIPNP\WinNT\lib\bc
Microsoft: C:\VXIPNP\WinNT\lib\msc
Then follow the instructions for your compiler on how to set up links to a library.
Now the compiler should stop complaining at you and you're good to go! Have fun!
Kileen Cheng
Applications Engineer
National Instruments -
Getting error when trying to compile a servlet
hai every one ,
when i placed my servlet in the classes directory of the tomcat server and trying to compile it i am getting the following error
javac :invalid flag:C:Program
usage:javac <options><source files>
where possible options include
-g Generate all debugging info
-g:none Generate no debugging info
-g:(lines, vars ,source) Generate only some debugging info
-nowarn Generate no warnigs
etc
i have specified the classpath of the application in the environment variables" Hi friend,
Wat you can do is ???
you gonna change your classpath to %tomcathome%=C: or D: or etc/Programfiles/Apache Tomcat 4.0/lib/etc/servlet.jar.
or else try locating servlet.jar file in the tomcat folder and place that in
C:\j2sdk1.4.0_01\lib folder and try compiling your code.
I guess it will work.
Regards,
RAHUL"
NO, if that was the problem it would have said
package javax.servlet dosen't exist -
Hi
In my current project I am facing the below issue.
In client MDM team is creating the master data. The BOM master data also creating through MDM only. The function module used is CSAP_MAT_BOM_MAINTAIN. When user trying to update the two extra BOM line items getting an error " Error while saving the BOM."
In SLG1 transaction we observed that the IDOC is trying to change the header level data. After analyzing I got some conclusion that
while BOM creation header level material and all components are created with change number reference. When the user trying to update two extra line items with new change number system giving error msg as idoc trying to change header level data. As my knowledge with FM:CSAP_MAT_BOM_MAINTAIN no changes possible for header. I came to conclusion as header is updated with a change number while creation and when we changing second time with new change number, system not able to replace the old change number with new change number.
To correct this IDOC what steps i can perform? Is it possible to reprocess this IDOC by changing any field values like MSGFN.
Please suggest what solution we can provide to reprocess this IDOC.
Regards
KesavaHi Rupesh
Thanks for the replay.
Here the user created the BOM with the same FM:CSAP_MAT_BOM_MAINTAIN but he created with change number refernce. This change number is updated in header. Later he wants to add some extra components to this BOM with the same FM:CSAP_MAT_BOM_MAINTAIN and he entered new change number second time to do the change. Then system giving an error status for this IDOC.Then if we check in SLG1 the error message is we are trying to change header fields which is not possible " The BOM header can only be displayed, Your entries were ingored". How can we reprocess this IDOC.
Regards
Kesava -
Permissions error when trying to compile PDF on client Windows 7 PCs with Acrobat
Most of our clients using Windows 7 and Adobe Acrobat to make PDF documents have suddenly started running into an error.
"Unable to open the document:
\\server\area\user\Documents\abc.docx
Please check to see if you have read permission for the above file"
Yes, we use folder redirection, and I've already tried to apply the solutions in this thread (Unable to open document. Please check to see if you have read permission for the above file.) without success.
I get the same issues when I try with my regular domain user with redirected home folders.
Checked the permissions on both Adobe Acrobat and the Document folder itself, and everything seems to be alright.
When you in Windows Explorer click the "Work offline" button, it suddenly works (duh, it's opening a local version of the file then). I've currently told the clients to use this as a temporary workaround, but it's not a solution that should really be used in the long run.
This issue is happening with both Acrobat 10 and 11...
PS: Most of the clients that use Acrobat use the Public 360 Case and Document Handling system. I do not believe it has anything to do with that, since I don't have it on my computer.Thank you for the response, but I am not scripting anything. I just have the url in the "URL for the link." set to "mailto: (email address)."
-
Error when trying to compile with cos.jar
When compiling on linux/tomcat machine I put the path to cos.jar in my javac command and get the following error:
.../cos.jar: cannot execute binary file
I can compile servlets that do not require this jar file but cannot compile servlets that need it.
Does anyone know how to resolve this?Then your command is wrong. The error message tells you that you're trying to execute the cos.jar instead of specifying it in the classpath.
-
Error when trying to view examples in LabView help
When pushing button to "open example" or "browse related examples" from within LabView help I get the following error
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://127.1.0.1:3580/National%20Instruments/LabVIEW/LabVIEW/7.1/OpenVIFromHelp?
The following error was encountered:
Connection Failed
The system returned:
(111) Connection refused
My IT-department are unable to help me.
They state that this is a Labview related problem and not at problem originating from our firewall or similar.
In this forum I've found one guy having a similar problem
(http://forums.ni.com/rss/message?board.id=170&message.id=192671 - only the address was ..127.0.0.1.. and not 127.1.0.1),
but unfortunately he never got an usable answer on his question. At least not anything that works for me.
Hope that I'm more lucky now!
In advance: Thank you very much for any help
JensI just fought this battle myself, and thought I would along what I found was helpful.
My example finder in LabVIEW 7.1.1 functionality was broken and I found that National was attempting to connect with Example Finder on my local machine using IP address 127.1.0.1, instead of the more common 127.0.0.1 address for localhost. The result was that the Example Finder HTTP:// request was being sent away from my machine using the Microsoft Windows Internet Explorer HTTP Proxy information to my corporate web proxy server. That proxy server was properly refusing to proxy the connection since 127.1.0.1 is a non-routable address.
The error message back from the corporate HTTP proxy server was the helpful item. Once I saw what was happening, I went into the Microsoft Windows control panel for internet options and on the connections tab, LAN setting button, ADVANCED button, entered 127.*.*.* into the field for "DO NOT PROXY THESE ADDRESSES"
Now the Example Finder requests are directed to the NI server on my local machine and the example finder is back to working.
This is the second time I worked this out, but I forgot what was learned the first time.... Guess we are all condemned to repeat our mistakes. -
[SOLVED] Xmonad error when trying to compile the default xmonad.hs
Hey,
if I copy the configuration file in /usr/share/xmonad-0.11/man/xmonad.hs,
I get the following error
Error detected while loading xmonad configuration file: /home/me/.xmonad/xmonad.hs
xmonad.hs:132:64: Not in scope: `help'
Please check the file for errors.
xmonad: xmessage: executeFile: does not exist (No such file or directory)
The offending line is
-- Run xmessage with a summary of the default keybindings (useful for beginners)
, ((modMask .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -"))
I don't really need that particular keybinding but nevertheless I would like to know what's happening here.
Last edited by Aton (2013-04-10 11:33:51)as for what's happening: help is just not defined.
judging from the code you are trying to use, it is supposed to be a string. and indeed http://xmonad.org/xmonad-docs/xmonad/sr … Config.htm
defines
help :: String
help = unlines ["The default modifier key is 'alt'. Default keybindings:",
"-- launching and killing programs",
"mod-Shift-Enter Launch xterminal",
"mod-p Launch dmenu",
"mod-Shift-p Launch gmrun",
"mod-Shift-c Close/kill the focused window",
"mod-Space Rotate through the available layout algorithms",
"mod-Shift-Space Reset the layouts on the current workSpace to default",
"mod-n Resize/refresh viewed windows to the correct size",
"-- move focus up or down the window stack",
"mod-Tab Move focus to the next window",
"mod-Shift-Tab Move focus to the previous window",
"mod-j Move focus to the next window",
"mod-k Move focus to the previous window",
"mod-m Move focus to the master window",
"-- modifying the window order",
"mod-Return Swap the focused window and the master window",
"mod-Shift-j Swap the focused window with the next window",
"mod-Shift-k Swap the focused window with the previous window",
"-- resizing the master/slave ratio",
"mod-h Shrink the master area",
"mod-l Expand the master area",
"-- floating layer support",
"mod-t Push window back into tiling; unfloat and re-tile it",
"-- increase or decrease number of windows in the master area",
"mod-comma (mod-,) Increment the number of windows in the master area",
"mod-period (mod-.) Deincrement the number of windows in the master area",
"-- quit, or restart",
"mod-Shift-q Quit xmonad",
"mod-q Restart xmonad",
"mod-[1..9] Switch to workSpace N",
"-- Workspaces & screens",
"mod-Shift-[1..9] Move client to workspace N",
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3",
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3",
"-- Mouse bindings: default actions bound to mouse events",
"mod-button1 Set the window to floating mode and move by dragging",
"mod-button2 Raise the window to the top of the stack",
"mod-button3 Set the window to floating mode and resize by dragging"] -
Compilation error when trying to compile simple page
Hello Everyone,
I have written a simple jsp which I intend on using as an include file. However when I try to compile the file I get the following error message (I am using Tomcat Version 4.1.30).
java.lang.NoClassDefFoundError: org/apache/jasper/
The code looks like so:
<%
String prefValue;
HttpSession session = request.getSession(true);
Boolean prefValueExists = (Boolean)session.getAttribute("cookieExists");
boolean flag = prefValueExists.booleanValue();
if(flag == true)
prefValue = (String)session.getAttribute("preferenceValue");
else
if(flag == false)
prefValue = "0";
%>I am only just starting out so I am relatively sure that I have made a simple oversite, it would be fantastic if somebody could be so kind as to let me know what I am not doing correctly. Thanks for your time.
Kind Regards
DavoYou're using quite a lot of different classes inside your JSP. Are you sure that you've done the necessary import statements of all these classes ?
An import in JSP should be written like this :
<%@ page import = "java.util.Iterator" %>
<%@ page import = "org.gertcuppens.cluif.Film" %> -
Forms Error when trying to compile a 6i Form in 9i
I have a form which is created in forms 6.
Im trying to compile that form in 9 but it gives me a warning like below
FRM-30457 Warning:Maximum length ignored for character datatype subordinate mirror item :ctl.descr
What should i do to correct this?Check all the properties of :ctl.descr item. It should be varchar2.
Maybe you are looking for
-
ITunes won't open for a different reason then anyone else has posted! HELP!
Hey, hopefully you can help me. I recently tried to move my music to my new external hard drive. It was successful and worked fine. All of the sudden, iTunes decided that it would not open. Whenever I try to open iTunes the following message pops up:
-
hi guys i have a small problem with the lovs. thats is the lovs have to be put inside the cabo/jsps directory . is there any way to avoid this . i want to keep the lovs with the other uix pages, but it is currently not possible. could u tell me if th
-
Installation Of Oracle 8.1.5 on Win2k machine
Hi, I am installing Oracle 8.1.5 on a Win2k machine. The configuration of which is as under: 1> IBM X360. 2> iNTEL fOSTER xEON 1.5GHz 3> Dual Processor 4> 512KB Cache 5> 36GB * 3 HDD(RAID5) 6> Windows 2000 Advance Server. While doing a typical instal
-
File download from phone to computer
Is like ******* impossible. I've had this phone close to years and any videos or pics i have can't be uploaded to my computer. When i plug my phone it asks to download driver that doesn't ******* download nor it recognizes it. I have videos i can't u
-
Required Layout Functional Specifications
HI every bady This is Janardhan ,SAP SD Functional Consultant, working for one of the top FMCG company as a SD consultant, IN this Project we have to develop Layouts for different areas like, packing list, Picking List, Invoice, proforma, Delivery no