Coder Social home page Coder Social logo

Files with same name about j2objc HOT 3 CLOSED

msnazarow avatar msnazarow commented on June 11, 2024
Files with same name

from j2objc.

Comments (3)

tomball avatar tomball commented on June 11, 2024

The javac tools converts the package into a relative directory when generating classfiles, so for example, java.util.Date causes the java/util/Date.class classfile to be generated. This way, java.sql.Date won't overwrite it, because it gets written to java/sql/Date.class. By default, j2objc follows the same pattern, so java/util/Date.h won't be overwritten by java/sql/Date.h.

A few beginning j2objc users wanted a simpler pattern, so the --no-package-directories flag was added, which would cause those two files to be written to the same path. We don't recommend using this flag (it's really only for hello-world level example apps). So this works as designed, and if you are using this flag and having this problem, either rename one of the classes or use a build system that supports relative paths for output files.

In the future, if you have questions, please ask them on https://stackoverflow.com/ with the #j2objc tag. Issues are normally used to report bugs and make enhancement suggestions.

from j2objc.

msnazarow avatar msnazarow commented on June 11, 2024

@tomball Yes, the issue with directories is that header path that j2obj generates is full.
And if i whant to use Cocoapods, and i stell have files with same names (even in different directories) - it won't compile until i use separate targets.
And just because every directory can have file with the same name, so i need target(Podspec) for each directory and it becomes hell.

So my real question was how to generate files with different names no matter what directories they located in

from j2objc.

tomball avatar tomball commented on June 11, 2024

from j2objc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.