×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    389

    undefined identifier "_snprintf'...

    在symbian下编译live555库,出错提示找不到snprintf。 可我已经包含了stdio.h, mmp里也加入了正确路径。/stdapis和/libc下里都有stdio.h,但只有/stdapis/stdio.h里声明了snprintf

    我的程序问题好像就出在snprintf都用sprintf替换了,两个函数有区别的吧。 怎么解决呢,谢谢指教!

    undefined identifier '_snprintf' HTTPSink.cpp
    undefined identifier '_snprintf' RTSPClient.cpp
    undefined identifier '_snprintf' RTSPServer.cpp
    undefined identifier '_snprintf' RTSPServer.cpp


    mmp文件:

    TARGET liveMedia.lib
    TARGETTYPE lib
    UID 0x0D245B49

    SOURCEPATH ..\liveMedia\src
    SOURCE AC3AudioRTPSink.cpp
    SOURCE AC3AudioRTPSource.cpp
    SOURCE AC3AudioStreamFramer.cpp
    SOURCE ADTSAudioFileServerMediaSubsession.cpp
    SOURCE ADTSAudioFileSource.cpp
    SOURCE AMRAudioFileServerMediaSubsession.cpp
    SOURCE AMRAudioFileSink.cpp
    SOURCE AMRAudioFileSource.cpp
    SOURCE AMRAudioRTPSink.cpp
    SOURCE AMRAudioRTPSource.cpp
    SOURCE AMRAudioSource.cpp
    SOURCE AudioInputDevice.cpp
    SOURCE AudioRTPSink.cpp
    SOURCE AVIFileSink.cpp
    SOURCE Base64.cpp
    SOURCE BasicUDPSink.cpp
    SOURCE BasicUDPSource.cpp
    SOURCE BitVector.cpp
    SOURCE BitVector.hh
    SOURCE ByteStreamFileSource.cpp
    SOURCE ByteStreamMultiFileSource.cpp
    SOURCE DarwinInjector.cpp
    SOURCE DeviceSource.cpp
    SOURCE DigestAuthentication.cpp
    SOURCE FileServerMediaSubsession.cpp
    SOURCE FileSink.cpp
    SOURCE FramedFileSource.cpp
    SOURCE FramedFilter.cpp
    SOURCE FramedSource.cpp
    SOURCE GSMAudioRTPSink.cpp
    SOURCE H261VideoRTPSource.cpp
    SOURCE H263plusVideoFileServerMediaSubsession.cpp
    SOURCE H263plusVideoRTPSink.cpp
    SOURCE H263plusVideoRTPSource.cpp
    SOURCE H263plusVideoStreamFramer.cpp
    SOURCE H263plusVideoStreamParser.cpp
    SOURCE H263plusVideoStreamParser.hh
    SOURCE H264VideoFileSink.cpp
    SOURCE H264VideoRTPSink.cpp
    SOURCE H264VideoRTPSource.cpp
    SOURCE H264VideoStreamFramer.cpp
    SOURCE HTTPSink.cpp
    SOURCE InputFile.cpp
    SOURCE JPEGVideoRTPSink.cpp
    SOURCE JPEGVideoRTPSource.cpp
    SOURCE JPEGVideoSource.cpp
    SOURCE Locale.cpp
    SOURCE Media.cpp
    SOURCE MediaSession.cpp
    SOURCE MediaSink.cpp
    SOURCE MediaSource.cpp
    SOURCE MP3ADU.cpp
    SOURCE MP3ADUdescriptor.cpp
    SOURCE MP3ADUdescriptor.hh
    SOURCE MP3ADUinterleaving.cpp
    SOURCE MP3ADURTPSink.cpp
    SOURCE MP3ADURTPSource.cpp
    SOURCE MP3ADUTranscoder.cpp
    SOURCE MP3AudioFileServerMediaSubsession.cpp
    SOURCE MP3FileSource.cpp
    SOURCE MP3HTTPSource.cpp
    SOURCE MP3Internals.cpp
    SOURCE MP3Internals.hh
    SOURCE MP3InternalsHuffman.cpp
    SOURCE MP3InternalsHuffman.hh
    SOURCE MP3InternalsHuffmanTable.cpp
    SOURCE MP3StreamState.cpp
    SOURCE MP3StreamState.hh
    SOURCE MP3Transcoder.cpp
    SOURCE MPEG1or2AudioRTPSink.cpp
    SOURCE MPEG1or2AudioRTPSource.cpp
    SOURCE MPEG1or2AudioStreamFramer.cpp
    SOURCE MPEG1or2Demux.cpp
    SOURCE MPEG1or2DemuxedElementaryStream.cpp
    SOURCE MPEG1or2DemuxedServerMediaSubsession.cpp
    SOURCE MPEG1or2FileServerDemux.cpp
    SOURCE MPEG1or2VideoFileServerMediaSubsession.cpp
    SOURCE MPEG1or2VideoHTTPSink.cpp
    SOURCE MPEG1or2VideoRTPSink.cpp
    SOURCE MPEG1or2VideoRTPSource.cpp
    SOURCE MPEG1or2VideoStreamDiscreteFramer.cpp
    SOURCE MPEG1or2VideoStreamFramer.cpp
    SOURCE MPEG2IndexFromTransportStream.cpp
    SOURCE MPEG2TransportFileServerMediaSubsession.cpp
    SOURCE MPEG2TransportStreamFramer.cpp
    SOURCE MPEG2TransportStreamFromESSource.cpp
    SOURCE MPEG2TransportStreamFromPESSource.cpp
    SOURCE MPEG2TransportStreamIndexFile.cpp
    SOURCE MPEG2TransportStreamMultiplexor.cpp
    SOURCE MPEG2TransportStreamTrickModeFilter.cpp
    SOURCE MPEG4ESVideoRTPSink.cpp
    SOURCE MPEG4ESVideoRTPSource.cpp
    SOURCE MPEG4GenericRTPSink.cpp
    SOURCE MPEG4GenericRTPSource.cpp
    SOURCE MPEG4LATMAudioRTPSink.cpp
    SOURCE MPEG4LATMAudioRTPSource.cpp
    SOURCE MPEG4VideoFileServerMediaSubsession.cpp
    SOURCE MPEG4VideoStreamDiscreteFramer.cpp
    SOURCE MPEG4VideoStreamFramer.cpp
    SOURCE MPEGVideoStreamFramer.cpp
    SOURCE MPEGVideoStreamParser.cpp
    SOURCE MPEGVideoStreamParser.hh
    SOURCE MultiFramedRTPSink.cpp
    SOURCE MultiFramedRTPSource.cpp
    SOURCE OnDemandServerMediaSubsession.cpp
    SOURCE our_md5.cpp our_md5.hh
    SOURCE our_md5hl.cpp OutputFile.cpp
    SOURCE PassiveServerMediaSubsession.cpp
    SOURCE QCELPAudioRTPSource.cpp
    SOURCE QuickTimeFileSink.cpp
    SOURCE QuickTimeGenericRTPSource.cpp
    SOURCE RTCP.cpp
    SOURCE rtcp_from_spec.cpp rtcp_from_spec.hh RTPInterface.cpp
    SOURCE RTPSink.cpp
    SOURCE RTPSource.cpp
    SOURCE RTSPClient.cpp
    SOURCE RTSPCommon.cpp
    SOURCE RTSPOverHTTPServer.cpp
    SOURCE RTSPServer.cpp
    SOURCE ServerMediaSession.cpp
    SOURCE SimpleRTPSink.cpp
    SOURCE SimpleRTPSource.cpp
    SOURCE SIPClient.cpp
    SOURCE StreamParser.cpp
    SOURCE StreamParser.hh
    SOURCE uLawAudioFilter.cpp
    SOURCE VideoRTPSink.cpp
    SOURCE WAVAudioFileServerMediaSubsession.cpp
    SOURCE WAVAudioFileSource.cpp


    USERINCLUDE ..\liveMedia\inc
    USERINCLUDE ..\groupsock\inc
    USERINCLUDE ..\BasicUsageEnvironment\inc
    USERINCLUDE ..\UsageEnvironment\inc

    SYSTEMINCLUDE \epoc32\include\stdapis
    //SYSTEMINCLUDE \epoc32\include\libc\sys
    SYSTEMINCLUDE \epoc32\include
    SYSTEMINCLUDE \epoc32\include\libc
    SYSTEMINCLUDE \epoc32\include\stdapis\sys
    SYSTEMINCLUDE \epoc32\include\stdapis\arpa
    SYSTEMINCLUDE \epoc32\include\stdapis\netinet

    LIBRARY estlib.lib
    LIBRARY euser.lib
    LIBRARY estor.lib
    LIBRARY groupsock.lib
    LIBRARY BasicUsageEnvironment.lib
    LIBRARY UsageEnvironment.lib
    LIBRARY libc.lib

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346

    Re: undefined identifier "_snprintf'...

    symbian不支持 snprintf, 你可以看看 openc 只不支持.

    snprintf 相比 sprintf 多了个最大长度限制, 安全一些.
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

  3. #3
    Regular Contributor
    Join Date
    Jun 2008
    Posts
    389

    Re: undefined identifier "_snprintf'...

    已经用s60_openc里的stdio.h覆盖了/include/stdapis/stdio.h。 还是找不到snprintf,为啥..

  4. #4
    Super Contributor
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346

    Re: undefined identifier "_snprintf'...

    编译出错么, openc的include目录好像是独立的, 所以值包含 \epoc32\include\stdapis, 好像不行, 确保包含 openc的include
    目录
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

  5. #5
    Registered User
    Join Date
    Apr 2006
    Location
    Beijing, China
    Posts
    1,175

    Re: undefined identifier "_snprintf'...

    stdapis与libc有些重叠,在mmp中把libc的那行SYSTEMINCLUDE去掉试试。
    Way of Simplicity

Similar Threads

  1. i cant build helloworld project
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2008-12-22, 12:38
  2. carbidec++ helloworld project problem
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2007-03-11, 12:40
  3. Replies: 3
    Last Post: 2007-01-18, 11:27
  4. carbide build problem help please
    By berkcekisbas in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-09-26, 19:41
  5. Whats missing?
    By imrank in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-08-28, 07:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×